package org.lanqiao.tjut.chengxu01;

import java.util.Scanner;

public class Runnian {

	/*
	 * 定义年份 大于0的任意整数
	 */
	private int Year;

	public void initYear() {
		Scanner input0 = new Scanner(System.in);
		System.out.println("请输入年份：");
		Year = input0.nextInt();
		if (Year > 0) {
			if (Year % 400 == 0 || (Year % 4 == 0 ^Year % 100 == 0)) {
				System.out.println("该年份是润年");

			} else {
				System.out.println("该年份不是闰年");
			}

		}

	}

	public int getYear() {
		return Year;
	}

	public void setYear(int year) {
		Year = year;
	}

}
